var Weapon = JW.Class.extend({
shoot:function(object)
{
	throw new Error("Nujno bol'we peregruzheniy");
},
CdDecrease:function(object)
{
	throw new Error("Nujno bol'we peregruzheniy");
}
})

var DefaultWeapon = Weapon.extend({
shoot:function(object)
{
	return [new GreenMonsterBullet({speedR: 30},object)]
},
CdDecrease:function(object)
{
return false
}
})

var DoubleBullet = Weapon.extend({
shoot:function(object)
{
	return [new GreenMonsterBullet({speedB: 10, speedR: 30},object),
	new GreenMonsterBullet({speedT: 10, speedR: 30},object)]
},
CdDecrease:function(object)
{
object.weapons[1] -= 1;
if(object.weapons[1]<0) { object.weapons[1]=0; return true;}
return false;
}
})

var TripleBullet = Weapon.extend({
shoot:function(object)
{
	return [new GreenMonsterBullet({speedR: 30},object), new GreenMonsterBullet({speedB: 10, speedR: 30},object),
	new GreenMonsterBullet({speedT: 10, speedR: 30},object)]
},
CdDecrease:function(object)
{
object.weapons[2] -= 1;
if(object.weapons[2]<0) { object.weapons[2]=0; return true;}
return false;
}
})

var Laser = Weapon.extend({
shoot:function(object)
{
	return [new GreenMonsterBullet({width: (799-(object.width/2+object.left)), speedR: 1, type:"Laser"},object)]
},
CdDecrease:function(object)
{
object.weapons[3] -= 1;
if(object.weapons[3]<0) { object.weapons[3]=0; return true;}
return false;
}
})


var ShrapnelGrenede = Weapon.extend({
shoot:function(object)
{
	return [new GreenMonsterBullet({width: 20,height: 20,speedR: 20, hp :5, type:"shrapnel"},object)]
},
CdDecrease:function(object)
{
object.weapons[4] -= 1;
if(object.weapons[4]<0) { object.weapons[4]=0; return true;}
return false;
}
})